3.428 \(\int \frac{(d+e x^r)^2 (a+b \log (c x^n))^2}{x} \, dx\)

Optimal. Leaf size=161 \[ \frac{d^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\frac{4 b d e n x^r \left (a+b \log \left (c x^n\right )\right )}{r^2}+\frac{2 d e x^r \left (a+b \log \left (c x^n\right )\right )^2}{r}-\frac{b e^2 n x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r^2}+\frac{e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )^2}{2 r}+\frac{4 b^2 d e n^2 x^r}{r^3}+\frac{b^2 e^2 n^2 x^{2 r}}{4 r^3} \]

[Out]

(4*b^2*d*e*n^2*x^r)/r^3 + (b^2*e^2*n^2*x^(2*r))/(4*r^3) - (4*b*d*e*n*x^r*(a + b*Log[c*x^n]))/r^2 - (b*e^2*n*x^
(2*r)*(a + b*Log[c*x^n]))/(2*r^2) + (2*d*e*x^r*(a + b*Log[c*x^n])^2)/r + (e^2*x^(2*r)*(a + b*Log[c*x^n])^2)/(2
*r) + (d^2*(a + b*Log[c*x^n])^3)/(3*b*n)

________________________________________________________________________________________

Rubi [A]  time = 0.236719, antiderivative size = 161, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 5, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {2353, 2302, 30, 2305, 2304} \[ \frac{d^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\frac{4 b d e n x^r \left (a+b \log \left (c x^n\right )\right )}{r^2}+\frac{2 d e x^r \left (a+b \log \left (c x^n\right )\right )^2}{r}-\frac{b e^2 n x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r^2}+\frac{e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )^2}{2 r}+\frac{4 b^2 d e n^2 x^r}{r^3}+\frac{b^2 e^2 n^2 x^{2 r}}{4 r^3} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x^r)^2*(a + b*Log[c*x^n])^2)/x,x]

[Out]

(4*b^2*d*e*n^2*x^r)/r^3 + (b^2*e^2*n^2*x^(2*r))/(4*r^3) - (4*b*d*e*n*x^r*(a + b*Log[c*x^n]))/r^2 - (b*e^2*n*x^
(2*r)*(a + b*Log[c*x^n]))/(2*r^2) + (2*d*e*x^r*(a + b*Log[c*x^n])^2)/r + (e^2*x^(2*r)*(a + b*Log[c*x^n])^2)/(2
*r) + (d^2*(a + b*Log[c*x^n])^3)/(3*b*n)

Rule 2353

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rubi steps

\begin{align*} \int \frac{\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx &=\int \left (\frac{d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}+2 d e x^{-1+r} \left (a+b \log \left (c x^n\right )\right )^2+e^2 x^{-1+2 r} \left (a+b \log \left (c x^n\right )\right )^2\right ) \, dx\\ &=d^2 \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx+(2 d e) \int x^{-1+r} \left (a+b \log \left (c x^n\right )\right )^2 \, dx+e^2 \int x^{-1+2 r} \left (a+b \log \left (c x^n\right )\right )^2 \, dx\\ &=\frac{2 d e x^r \left (a+b \log \left (c x^n\right )\right )^2}{r}+\frac{e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )^2}{2 r}+\frac{d^2 \operatorname{Subst}\left (\int x^2 \, dx,x,a+b \log \left (c x^n\right )\right )}{b n}-\frac{(4 b d e n) \int x^{-1+r} \left (a+b \log \left (c x^n\right )\right ) \, dx}{r}-\frac{\left (b e^2 n\right ) \int x^{-1+2 r} \left (a+b \log \left (c x^n\right )\right ) \, dx}{r}\\ &=\frac{4 b^2 d e n^2 x^r}{r^3}+\frac{b^2 e^2 n^2 x^{2 r}}{4 r^3}-\frac{4 b d e n x^r \left (a+b \log \left (c x^n\right )\right )}{r^2}-\frac{b e^2 n x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{2 r^2}+\frac{2 d e x^r \left (a+b \log \left (c x^n\right )\right )^2}{r}+\frac{e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )^2}{2 r}+\frac{d^2 \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}\\ \end{align*}

Mathematica [A]  time = 0.267785, size = 179, normalized size = 1.11 \[ \frac{3 e n x^r \left (2 a^2 r^2 \left (4 d+e x^r\right )-2 a b n r \left (8 d+e x^r\right )+b^2 n^2 \left (16 d+e x^r\right )\right )+12 a^2 d^2 n r^3 \log (x)+6 b r^2 \log ^2\left (c x^n\right ) \left (2 a d^2 r+b e n x^r \left (4 d+e x^r\right )\right )-6 b e n r x^r \log \left (c x^n\right ) \left (b n \left (8 d+e x^r\right )-2 a r \left (4 d+e x^r\right )\right )+4 b^2 d^2 r^3 \log ^3\left (c x^n\right )}{12 n r^3} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x^r)^2*(a + b*Log[c*x^n])^2)/x,x]

[Out]

(3*e*n*x^r*(2*a^2*r^2*(4*d + e*x^r) - 2*a*b*n*r*(8*d + e*x^r) + b^2*n^2*(16*d + e*x^r)) + 12*a^2*d^2*n*r^3*Log
[x] - 6*b*e*n*r*x^r*(-2*a*r*(4*d + e*x^r) + b*n*(8*d + e*x^r))*Log[c*x^n] + 6*b*r^2*(2*a*d^2*r + b*e*n*x^r*(4*
d + e*x^r))*Log[c*x^n]^2 + 4*b^2*d^2*r^3*Log[c*x^n]^3)/(12*n*r^3)

________________________________________________________________________________________

Maple [C]  time = 0.326, size = 2844, normalized size = 17.7 \begin{align*} \text{output too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+e*x^r)^2*(a+b*ln(c*x^n))^2/x,x)

[Out]

-2*I/r*Pi*a*b*d*e*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)*x^r+2*I/r^2*Pi*b^2*d*e*n*csgn(I*x^n)*csgn(I*c*x^n)*csgn(
I*c)*x^r-4/r^2*ln(c)*b^2*d*e*n*x^r-4/r^2*a*b*d*e*n*x^r-1/8/r*Pi^2*b^2*e^2*csgn(I*x^n)^2*csgn(I*c*x^n)^4*(x^r)^
2+1/4/r*Pi^2*b^2*e^2*csgn(I*x^n)*csgn(I*c*x^n)^5*(x^r)^2+1/4/r*Pi^2*b^2*e^2*csgn(I*c*x^n)^5*csgn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b*e^2*csgn(I*c*x^n)^3*(x^r)^2-I*ln(x)*Pi*a*b*d^2*csgn(I*c*x^n)^
3+1/2*I*ln(x)^2*Pi*b^2*d^2*n*csgn(I*c*x^n)^3-I*ln(x)*ln(c)*Pi*b^2*d^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+2*ln
(x)*ln(c)*a*b*d^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)^2*(a+b*log(c*x^n))^2/x,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.64594, size = 806, normalized size = 5.01 \begin{align*} \frac{4 \, b^{2} d^{2} n^{2} r^{3} \log \left (x\right )^{3} + 12 \,{\left (b^{2} d^{2} n r^{3} \log \left (c\right ) + a b d^{2} n r^{3}\right )} \log \left (x\right )^{2} + 3 \,{\left (2 \, b^{2} e^{2} n^{2} r^{2} \log \left (x\right )^{2} + 2 \, b^{2} e^{2} r^{2} \log \left (c\right )^{2} + b^{2} e^{2} n^{2} - 2 \, a b e^{2} n r + 2 \, a^{2} e^{2} r^{2} - 2 \,{\left (b^{2} e^{2} n r - 2 \, a b e^{2} r^{2}\right )} \log \left (c\right ) + 2 \,{\left (2 \, b^{2} e^{2} n r^{2} \log \left (c\right ) - b^{2} e^{2} n^{2} r + 2 \, a b e^{2} n r^{2}\right )} \log \left (x\right )\right )} x^{2 \, r} + 24 \,{\left (b^{2} d e n^{2} r^{2} \log \left (x\right )^{2} + b^{2} d e r^{2} \log \left (c\right )^{2} + 2 \, b^{2} d e n^{2} - 2 \, a b d e n r + a^{2} d e r^{2} - 2 \,{\left (b^{2} d e n r - a b d e r^{2}\right )} \log \left (c\right ) + 2 \,{\left (b^{2} d e n r^{2} \log \left (c\right ) - b^{2} d e n^{2} r + a b d e n r^{2}\right )} \log \left (x\right )\right )} x^{r} + 12 \,{\left (b^{2} d^{2} r^{3} \log \left (c\right )^{2} + 2 \, a b d^{2} r^{3} \log \left (c\right ) + a^{2} d^{2} r^{3}\right )} \log \left (x\right )}{12 \, r^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)^2*(a+b*log(c*x^n))^2/x,x, algorithm="fricas")

[Out]

1/12*(4*b^2*d^2*n^2*r^3*log(x)^3 + 12*(b^2*d^2*n*r^3*log(c) + a*b*d^2*n*r^3)*log(x)^2 + 3*(2*b^2*e^2*n^2*r^2*l
og(x)^2 + 2*b^2*e^2*r^2*log(c)^2 + b^2*e^2*n^2 - 2*a*b*e^2*n*r + 2*a^2*e^2*r^2 - 2*(b^2*e^2*n*r - 2*a*b*e^2*r^
2)*log(c) + 2*(2*b^2*e^2*n*r^2*log(c) - b^2*e^2*n^2*r + 2*a*b*e^2*n*r^2)*log(x))*x^(2*r) + 24*(b^2*d*e*n^2*r^2
*log(x)^2 + b^2*d*e*r^2*log(c)^2 + 2*b^2*d*e*n^2 - 2*a*b*d*e*n*r + a^2*d*e*r^2 - 2*(b^2*d*e*n*r - a*b*d*e*r^2)
*log(c) + 2*(b^2*d*e*n*r^2*log(c) - b^2*d*e*n^2*r + a*b*d*e*n*r^2)*log(x))*x^r + 12*(b^2*d^2*r^3*log(c)^2 + 2*
a*b*d^2*r^3*log(c) + a^2*d^2*r^3)*log(x))/r^3

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x**r)**2*(a+b*ln(c*x**n))**2/x,x)

[Out]

Exception raised: TypeError

________________________________________________________________________________________

Giac [B]  time = 1.29143, size = 568, normalized size = 3.53 \begin{align*} \frac{1}{3} \, b^{2} d^{2} n^{2} \log \left (x\right )^{3} + \frac{2 \, b^{2} d n^{2} x^{r} e \log \left (x\right )^{2}}{r} + b^{2} d^{2} n \log \left (c\right ) \log \left (x\right )^{2} + \frac{4 \, b^{2} d n x^{r} e \log \left (c\right ) \log \left (x\right )}{r} + b^{2} d^{2} \log \left (c\right )^{2} \log \left (x\right ) + a b d^{2} n \log \left (x\right )^{2} + \frac{b^{2} n^{2} x^{2 \, r} e^{2} \log \left (x\right )^{2}}{2 \, r} + \frac{2 \, b^{2} d x^{r} e \log \left (c\right )^{2}}{r} - \frac{4 \, b^{2} d n^{2} x^{r} e \log \left (x\right )}{r^{2}} + \frac{4 \, a b d n x^{r} e \log \left (x\right )}{r} + 2 \, a b d^{2} \log \left (c\right ) \log \left (x\right ) + \frac{b^{2} n x^{2 \, r} e^{2} \log \left (c\right ) \log \left (x\right )}{r} - \frac{4 \, b^{2} d n x^{r} e \log \left (c\right )}{r^{2}} + \frac{4 \, a b d x^{r} e \log \left (c\right )}{r} + \frac{b^{2} x^{2 \, r} e^{2} \log \left (c\right )^{2}}{2 \, r} + a^{2} d^{2} \log \left (x\right ) - \frac{b^{2} n^{2} x^{2 \, r} e^{2} \log \left (x\right )}{2 \, r^{2}} + \frac{a b n x^{2 \, r} e^{2} \log \left (x\right )}{r} + \frac{4 \, b^{2} d n^{2} x^{r} e}{r^{3}} - \frac{4 \, a b d n x^{r} e}{r^{2}} + \frac{2 \, a^{2} d x^{r} e}{r} - \frac{b^{2} n x^{2 \, r} e^{2} \log \left (c\right )}{2 \, r^{2}} + \frac{a b x^{2 \, r} e^{2} \log \left (c\right )}{r} + \frac{b^{2} n^{2} x^{2 \, r} e^{2}}{4 \, r^{3}} - \frac{a b n x^{2 \, r} e^{2}}{2 \, r^{2}} + \frac{a^{2} x^{2 \, r} e^{2}}{2 \, r} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)^2*(a+b*log(c*x^n))^2/x,x, algorithm="giac")

[Out]

1/3*b^2*d^2*n^2*log(x)^3 + 2*b^2*d*n^2*x^r*e*log(x)^2/r + b^2*d^2*n*log(c)*log(x)^2 + 4*b^2*d*n*x^r*e*log(c)*l
og(x)/r + b^2*d^2*log(c)^2*log(x) + a*b*d^2*n*log(x)^2 + 1/2*b^2*n^2*x^(2*r)*e^2*log(x)^2/r + 2*b^2*d*x^r*e*lo
g(c)^2/r - 4*b^2*d*n^2*x^r*e*log(x)/r^2 + 4*a*b*d*n*x^r*e*log(x)/r + 2*a*b*d^2*log(c)*log(x) + b^2*n*x^(2*r)*e
^2*log(c)*log(x)/r - 4*b^2*d*n*x^r*e*log(c)/r^2 + 4*a*b*d*x^r*e*log(c)/r + 1/2*b^2*x^(2*r)*e^2*log(c)^2/r + a^
2*d^2*log(x) - 1/2*b^2*n^2*x^(2*r)*e^2*log(x)/r^2 + a*b*n*x^(2*r)*e^2*log(x)/r + 4*b^2*d*n^2*x^r*e/r^3 - 4*a*b
*d*n*x^r*e/r^2 + 2*a^2*d*x^r*e/r - 1/2*b^2*n*x^(2*r)*e^2*log(c)/r^2 + a*b*x^(2*r)*e^2*log(c)/r + 1/4*b^2*n^2*x
^(2*r)*e^2/r^3 - 1/2*a*b*n*x^(2*r)*e^2/r^2 + 1/2*a^2*x^(2*r)*e^2/r